﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using University.Workshop.Presenters.WaterPurchase;

namespace University.Workshop.Presentation.WaterPurchase
{
    /// <summary>
    /// Interaction logic for PageFirstStepReadWaterPurchase.xaml
    /// </summary>
    public partial class PageFirstStepReadWaterPurchase : Page, IFirstStepReadWaterPurchase
    {
        PresenterReadWaterPurchase pInternal;
        PresenterReadFirstStep pReadFirstStep;

        public PageFirstStepReadWaterPurchase(PresenterReadWaterPurchase pExternal)
        {
            InitializeComponent();
            pInternal = pExternal;
            pReadFirstStep = new PresenterReadFirstStep(this);
        }



        #region IFirstStepReadWaterPurchase Members

        public string LicencePlate
        {
            set
            {
                LicencePlateLbl.Content = value;
            }
        }

        public string Capacity
        {
            set
            {
                CapacityLbl.Content = value;
            }
        }

        public string PersonNames
        {
            set
            {
                PersonNamesLbl.Content = value;
            }
        }

        public string PersonLastNames
        {
            set
            {
                PersonLastNamesLbl.Content = value;
            }
        }

        #endregion

        #region IReadBasicWaterPurchase Members

        

        public void Update()
        {
            pReadFirstStep.UpdateData();
        }

        public void GoNextPage()
        {
            pInternal.GoStepTwo();
        }

        public void GoBackPage()
        {
        }

        public Model.WaterPurchase WaterPurchaseToRead
        {
            get;
            set;
        }
        #endregion


        private void Page_Loaded(object sender, RoutedEventArgs e)
        {
            App.Current.MainWindow.Title = "Ver Compra";
        }

    }
}
